CINC = -I..\inc \
		-I..\inc\firmware
OBJDIR = ..\out\obj
BUILDLOG = ..\out\build.log
LIBDIR = ..\out\lib

SRCS = app_uds.c \
	   api_infostore.c \
	   api_gsm.c \
	   app_gsm.c \
	   api_com.c \
	   api_vdtp.c \
	   api_device.c \
	   api_socket.c \
	   api_gpio.c \
	   app_gpio.c \
	   api_i2c.c \
	   api_bma2x2.c \
	   app_bma250e.c \
	   app_test.c \
	   app_custom.c \
	   api_gps.c \
	   app_can.c \
	   api_k.c \
	   app_k.c \
	   api_vdtp.c \
	   app_server.c \
	   app_device_management.c \
	   app_fs.c \
	   app_alarm.c \
	   api_edp.c \
	   app_edp.c \
	   main.c

OBJS = $(patsubst %.c,%.o,$(SRCS))

all:mak lib
mak : $(OBJS)	
%.o : %.c
	$(CC16) -c $(CFLAGS) $(CDEFS) $(CINC) -o $(OBJDIR)\$@ $<  2>>$(BUILDLOG)

lib:
	$(AR) -r $(LIBDIR)\app.a $(patsubst %,$(OBJDIR)\\%,$(OBJS))